import '../utils/concrete'
/* eslint-disable */

/* 查询人员档案 */
export function searchPersonnel(personForm, pageNum, pageSize) {
  const data = {
    condition: {
      record_sfzhm: personForm.record_sfzhm,
      record_no: personForm.record_no,
      record_dw: personForm.record_dw,
      record_chargeunit: personForm.record_unitno,
      record_name: personForm.record_name,
      record_lxdh: personForm.record_lxdh,
      record_zw: personForm.record_zw,
      record_xb: personForm.record_xb,
      record_rzrq_start: personForm.record_start[0],
      record_rzrq_end: personForm.record_start[1],
      record_state: personForm.record_state
    },
    pageSize: pageSize,
    num: pageNum
  }
  return concrete.module('BaserecordManageService').selectaserecords(data)
}
/* 添加人员档案 */
export function addPersonnel(addPersonForm) {
  const data = {
        record_sfzhm: addPersonForm.record_sfzhm,
        record_no: addPersonForm.record_no,
        record_dw: addPersonForm.record_dw,
        record_name: addPersonForm.record_name,
        record_lxdh: addPersonForm.record_lxdh,
        record_state: addPersonForm.record_state,
        record_zw: addPersonForm.record_zw,
        record_xb: addPersonForm.record_xb,
        record_rzrq: addPersonForm.record_rzrq,
        record_csrq: addPersonForm.record_csrq
    }
  return concrete.module('BaserecordManageService').addBaserecord(data)
}
/* 修改人员档案信息 */
export function updatePersonnel(editForm) {
  const data = {
    record_sfzhm: editForm.record_sfzhm,
    record_no: editForm.record_no,
    record_dw: editForm.record_dw,
    record_name: editForm.record_name,
    record_lxdh: editForm.record_lxdh,
    record_state: editForm.record_state,
    record_zw: editForm.record_zw,
    record_xb: editForm.record_xb,
    record_rzrq: editForm.record_rzrq,
    record_csrq: editForm.record_csrq
  }
  return concrete.module('BaserecordManageService').updateBaserecord(data)
}
/* 删除人员档案信息 */
export function delPersonnel(data) {
  return concrete.module('BaserecordManageService').deleteBaserecord(data)
}
/* 根据单位查询对应的收费路段 */
export function selUnitByOrg(param) {
  return concrete.module('SysComponentService').updateChargeUnitComboboxStore(param)
}
/* 修改收费员对应的收费路段 */
export function editUnit(param) {
  console.log(param)
  const data = {
    record_sfzhm: param.record_sfzhm,
    record_dw: param.dw,
    record_unit: param.roads,
    record_name: param.record_name,
}
  return concrete.module('BaserecordManageService').updateRecordUnit(data)
}
